package com.baiyue.entity;

import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;


import com.baomidou.mybatisplus.enums.FieldStrategy;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
import org.springframework.validation.annotation.Validated;

/**
 *
 * @author 伍波
 * @date 2024-04-30
 */
@Data
@TableName("table_set")
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Validated
public class TableSet implements Serializable {
    /**
     * 主键id，自动递增
     */
    private Integer id;
    /**
     * 桌台号（房间号）
     */
    @TableField("room_name")
    private String roomName;
    /**
     * 类别（0-卡座，1-大厅，2-小包，3-中包，4-大包，5-豪包，6-其他）
     */
    private Integer category;
    /**
     * 计费规则（用于关联计费规则表，存放计费规则id）
     */
    @TableField("billing_rules")
    private Integer billingRules;
    /**
     * 是否有最低消费（0-否，1-是）
     */
    @TableField("minimum_spend")
    private Integer minimumSpend;
    /**
     * 最低消费金额，当最低消费为是的时候 不可为空
     */
    @TableField("minimum_purchase_amount")
    private Integer minimumPurchaseAmount;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 创建人
     */
    @TableField("create_by")
    private String createBy;
    /**
     * 更新时间
     */
    @TableField("update_time")
    private Date updateTime;
    /**
     * 更新人
     */
    @TableField("update_by")
    private String updateBy;

    /**
     * 状态 0 正常 ，1 删除
     */
    private Integer status;

    /**
     * 包间状态：0-空闲，1-开启，2-暂停计费
     */
    private Integer state;
    /**
     * 开始时间
     */
    @TableField(exist = false)
    private String start;

    /**
     * 结束时间
     */
    @TableField(exist = false)
    private String end;

    /**
     * uuid 唯一值 包间开单后每次生产
     */
    private String uuid;

    /**
     * 排序字段
     */
    @TableField(exist = false)
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private String sortField;

    /**
     * 排序顺序
     * desc  asc
     */
    @TableField(exist = false)
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private String sortValue;

    public TableSet(String roomName, Integer category, Integer billingRules, Integer minimumSpend,
                    Integer minimumPurchaseAmount, Date createTime, String createBy, Date updateTime, String updateBy,
                    String start, String end, Integer status, Integer state, String sortField, String sortValue) {
        this.roomName = roomName;
        this.category = category;
        this.billingRules = billingRules;
        this.minimumSpend = minimumSpend;
        this.minimumPurchaseAmount = minimumPurchaseAmount;
        this.createTime = createTime;
        this.createBy = createBy;
        this.updateTime = updateTime;
        this.updateBy = updateBy;
        this.start = start;
        this.end = end;
        this.status = status;
        this.state = state;
        this.sortField = sortField;
        this.sortValue = sortValue;
    }
}
